package org.example.api;

import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.example.vo.DeptVo;
import org.springframework.stereotype.Component;

/**
 * @author 天天向上 （john.yi@qq.com）
 * @date 2020/9/5.
 */
@Slf4j
@Component
public class DeptServiceApiFallbackFactory implements FallbackFactory<DeptServiceApi> {
    @Override
    public DeptServiceApi create(Throwable ex) {
        log.error(ex.getMessage(), ex);
        return new DeptServiceApiFallback();
    }
}
